import 'package:flutter/material.dart';
import 'package:flutter_widget_learn/routes.dart';
import 'package:flutter_widget_learn/baseWidgetList/Button.dart';
import 'package:flutter_widget_learn/baseWidgetList/ImageAndIcon.dart';
import 'package:flutter_widget_learn/baseWidgetList/SwitchAndCheckbox.dart';
import 'package:flutter_widget_learn/baseWidgetList/Text.dart';
import 'package:flutter_widget_learn/utils/CustomPageTransitionBuilder.dart';

import 'home.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
        pageTransitionsTheme: PageTransitionsTheme(
          builders: {
            TargetPlatform.android: CustomPageTransitionBuilder(),
            TargetPlatform.iOS: CustomPageTransitionBuilder(),
          },
        ),
      ),
      //注册路由表
      routes: routes,
      home: HomePage(title: 'Flutter 实战'),
    );
  }
}
